<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script>
    var gaProperty = 'UA-2577926-1';
    // Disable tracking if the opt-out cookie exists.
    var disableStr = 'ga-disable-' + gaProperty;
    if (document.cookie.indexOf(disableStr + '=true') > -1) {
      window[disableStr] = true;
    }
    function gaOptout() {
      document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = true;
    }
    function gaOptoutRevoke() {
      document.cookie = disableStr + '=false; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = false;
    }
    </script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-2577926-1', { 'anonymize_ip': true });
    </script>
    <link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
    <script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
    <script>
    window.addEventListener("load", function() {
      window.cookieconsent.initialise({
        'palette': {
          'popup': {
            'background': '#eaf7f7',
            'text': '#5c7291'
          },
          'button': {
            'background': '#56cbdb',
            'text': '#ffffff'
          }
        },
        'theme': 'edgeless',
        'type': 'opt-out',
        'onInitialise': function (status) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onStatusChange': function(status, chosenBefore) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onRevokeChoice': function() {
          gaOptoutRevoke()
        }
      })
    });
    </script>
    <title>OpenLayers v6.13.0 API - Class: WebGLPostProcessingPass</title>
    <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch"></script>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <script src="scripts/bootstrap.bundle.min.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
    <link type="text/css" rel="stylesheet" href="styles/site.css">
  </head>
  <body>
    <div class="container-fluid">
      <header class="navbar navbar-expand-sm navbar-dark mb-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="https://openlayers.org/"><img src="logo-70x70.png" alt="">&nbsp;OpenLayers</a>

        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
          <ul class="navbar-nav ml-auto">
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="docdropdown">
              <a class="dropdown-item" href="/en/latest/doc/">Docs</a>
              <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
                <a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
                <a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
                <a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
            </div>
          </li>
          <li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li>
          <li class="nav-item active"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap mr-1"></i>API</a></li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="codedropdown">
              <a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
              <a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
            </div>
           </li>
          </ul>
        </nav>
      </header>
      <div id="wrap" class="row">
        <div class="navigation col-md-4 col-lg-3">
          <div class="search-wrapper">
            <div class="search">
              <input id="search" type="text" autocomplete="off" class="form-control input-sm" placeholder="Search Documentation">
            </div>
          </div>
          <div class="navigation-list-wrapper">
            <ul class="navigation-list search-empty">
<li class="item item-class toggle-manual toggle-manual-show" data-longname="module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass" data-name="ol/webgl/postprocessingpass">
    <span class="title toggle">
        <span class="fa fa-chevron-right mr-2 mt-1"></span>
        <span><a href="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html">ol​/webgl​/PostProcessingPass</a></span>
    </span>
    <div class="member-list" data-type="methods">
        <span class="subtitle">Methods</span>
        <ul>
            <li data-name="apply"><a href="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html#apply">apply</a>
            <li data-name="getframebuffer"><a href="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html#getFrameBuffer">getFrameBuffer</a>
            <li data-name="getgl"><a href="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html#getGL">getGL</a>
            <li data-name="init"><a href="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html#init">init</a>
        </ul>
    </div>
              <li class="loading">Loading …
            </ul>
          </div>
        </div>

        <div class="main col-md-8 col-lg-9">
            <h1 class="page-title" data-filename="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html">Class: WebGLPostProcessingPass</h1>
            <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
              <button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
              This documentation is for OpenLayers v<span id="package-version">6.13.0</span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
            </div>
            



<section class="content">

<header>
    <h2 class="my-3">
        <span class="ancestors"><a href="module-ol_webgl_PostProcessingPass.html">ol/webgl/PostProcessingPass</a>~</span>WebGLPostProcessingPass
    </h2>
    <br>
    
      
      
        <pre class="prettyprint source"><code>import WebGLPostProcessingPass from '<a href="module-ol_webgl_PostProcessingPass.html">ol/webgl/PostProcessingPass</a>';</code></pre>
      
    
    <div class="row p-3 ">
      <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
        <script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg" id="_carbonads_js"></script>
      </div>
    
      <div class="class-description col-lg-7 align-self-center pl-0"><p>This class is used to define Post Processing passes with custom shaders and uniforms.
This is used internally by <a href="module-ol_webgl_Helper-WebGLHelper.html"><code>module:ol/webgl/Helper~WebGLHelper</code></a>.</p>
<p>Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that
a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).
Failing to provide pixel colors with premultiplied alpha will result in render anomalies.</p>
<p>The default post-processing pass does <em>not</em> multiply color values with alpha value, it expects color values to be
premultiplied.</p>
<p>Default shaders are shown hereafter:</p>
<ul>
<li><p>Vertex shader:</p>
<pre class="prettyprint source"><code>precision mediump float;

attribute vec2 a_position;
varying vec2 v_texCoord;
varying vec2 v_screenCoord;

uniform vec2 u_screenSize;

void main() {
  v_texCoord = a_position * 0.5 + 0.5;
  v_screenCoord = v_texCoord * u_screenSize;
  gl_Position = vec4(a_position, 0.0, 1.0);
}</code></pre></li>
<li><p>Fragment shader:</p>
<pre class="prettyprint source"><code>precision mediump float;

uniform sampler2D u_image;
uniform float u_opacity;

varying vec2 v_texCoord;

void main() {
  gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
}</code></pre></li>
</ul></div>
    
    </div>
</header>

<article>
    <div class="container-overview">
    

    
        <dl>
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="WebGLPostProcessingPass">
        </div>
        <h4 class="name">
            new WebGLPostProcessingPass<span class="signature">(options)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js">webgl/PostProcessingPass.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js#L103">line 103</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>options</code></td>
            
            
            

            <td colspan=2 class="description last">
                
                <p>Options.</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>webGlContext</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">WebGLRenderingContext</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>WebGL context; mandatory.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>scaleRatio</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Scale ratio; if &lt; 1, the post process will render to a texture smaller than
the main canvas that will then be sampled up (useful for saving resource on blur steps).</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>vertexShader</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">string</span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Vertex shader source</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>fragmentShader</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">string</span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Fragment shader source</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>uniforms</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, <a href="module-ol_webgl_Helper.html#~UniformValue">module:ol/webgl/Helper~UniformValue</a>></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Uniform definitions for the post process step</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        </dl>
    
    </div>

    

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="apply">
        </div>
        <h4 class="name">
            apply<span class="signature">(frameState, <span class="optional">nextPass</span>, <span class="optional">preCompose</span>, <span class="optional">postCompose</span>)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js">webgl/PostProcessingPass.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js#L259">line 259</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Render to the next postprocessing pass (or to the canvas if final pass).</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>frameState</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_PluggableMap.html#~FrameState">module:ol/PluggableMap~FrameState</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>current frame state</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>nextPass</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_webgl_PostProcessingPass-WebGLPostProcessingPass.html">module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Next pass, optional</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>preCompose</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">function</span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Called before composing.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>postCompose</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">function</span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Called before composing.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.pixelRatio</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The pixel ratio of the frame.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.time</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The time when rendering of the frame was requested.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.viewState</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_View.html#~State">module:ol/View~State</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The state of the current view.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.animate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Animate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.coordinateToPixelTransform</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_transform.html#~Transform">module:ol/transform~Transform</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>CoordinateToPixelTransform.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.declutterTree</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">module:rbush</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>DeclutterTree.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.extent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">null</span>
|

<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Extent.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.nextExtent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Next extent during an animation series.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.index</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Index.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.layerStatesArray</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_layer_Layer.html#~State">module:ol/layer/Layer~State</a>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>LayerStatesArray.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.layerIndex</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>LayerIndex.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.pixelToCoordinateTransform</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_transform.html#~Transform">module:ol/transform~Transform</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>PixelToCoordinateTransform.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.postRenderFunctions</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_PluggableMap.html#~PostRenderFunction">module:ol/PluggableMap~PostRenderFunction</a>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>PostRenderFunctions.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.size</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_size.html#~Size">module:ol/size~Size</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Size.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.tileQueue</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">module:ol/TileQueue~TileQueue</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>TileQueue.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.usedTiles</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, Object.&lt;string, boolean>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>UsedTiles.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.viewHints</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>ViewHints.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.wantedTiles</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, Object.&lt;string, boolean>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>WantedTiles.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.mapId</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The id of the map.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>frameState.renderTargets</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, boolean></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Identifiers of previously rendered elements.</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getFrameBuffer">
        </div>
        <h4 class="name">
            getFrameBuffer<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{WebGLFramebuffer}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js">webgl/PostProcessingPass.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js#L322">line 322</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
Frame buffer
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="getGL">
        </div>
        <h4 class="name">
            getGL<span class="signature">()</span><span class="fa fa-arrow-circle-right"></span><span class="type-signature returnType">{WebGLRenderingContext}</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js">webgl/PostProcessingPass.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js#L186">line 186</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Get the WebGL rendering context</p>
    </div>
    

    

    

    
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    
    
    


<h5>Returns:</h5>
The rendering context.
<br />

    

    
</dd>

        
            
            
<dt class="">
    
    <div class="nameContainer">
        <div class="anchor" id="init">
        </div>
        <h4 class="name">
            init<span class="signature">(frameState)</span>
            
            

        </h4>
        
        <div class="tag-source">
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js">webgl/PostProcessingPass.js</a>,
            <a href="https://github.com/openlayers/openlayers/blob/v6.13.0/src/ol/webgl/PostProcessingPass.js#L197">line 197</a>
        </div>
        
    </div>
    
    
</dt>
<dd class="">



    
    <div class="description">
        <p>Initialize the render target texture of the post process, make sure it is at the
right size and bind it as a render target for the next draw calls.
The last step to be initialized will be the one where the primitives are rendered.</p>
    </div>
    

    

    

    
    
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>frameState</code></td>
            
            
            

            <td colspan=2 class="description last">
                
                <p>current frame state</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr class="">
            
                <td class="name"><code>pixelRatio</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The pixel ratio of the frame.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>time</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The time when rendering of the frame was requested.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>viewState</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_View.html#~State">module:ol/View~State</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The state of the current view.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>animate</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">boolean</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Animate.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>coordinateToPixelTransform</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_transform.html#~Transform">module:ol/transform~Transform</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>CoordinateToPixelTransform.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>declutterTree</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">module:rbush</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>DeclutterTree.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>extent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">null</span>
|

<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Extent.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>nextExtent</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_extent.html#~Extent">module:ol/extent~Extent</a></span>

 | undefined
                
            
            </td>

            

            <td  class="description last">
                
                <p>Next extent during an animation series.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>index</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Index.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>layerStatesArray</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_layer_Layer.html#~State">module:ol/layer/Layer~State</a>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>LayerStatesArray.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>layerIndex</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">number</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>LayerIndex.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>pixelToCoordinateTransform</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_transform.html#~Transform">module:ol/transform~Transform</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>PixelToCoordinateTransform.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>postRenderFunctions</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="module-ol_PluggableMap.html#~PostRenderFunction">module:ol/PluggableMap~PostRenderFunction</a>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>PostRenderFunctions.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>size</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type"><a href="module-ol_size.html#~Size">module:ol/size~Size</a></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Size.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>tileQueue</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">module:ol/TileQueue~TileQueue</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>TileQueue.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>usedTiles</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, Object.&lt;string, boolean>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>UsedTiles.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>viewHints</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;number></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>ViewHints.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>wantedTiles</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, Object.&lt;string, boolean>></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>WantedTiles.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>mapId</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">string</span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>The id of the map.</p></td>
        </tr>
	
	
	
        <tr class="">
            
                <td class="name"><code>renderTargets</code></td>
            
            
            
            <td class="type">
            
                
<span class="param-type">Object.&lt;string, boolean></span>


                
            
            </td>

            

            <td  class="description last">
                
                <p>Identifiers of previously rendered elements.</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    

    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>


    

    

    

    

    

    
</dd>

        </dl>
    

    

    
</article>

</section>




        </div>
      </div>
      <script>prettyPrint();</script>
      <script src="scripts/linenumber.js"></script>
      <script src="scripts/main.js"></script>
    </div>
  </body>
</html>